Skip to main content
Version: Upcoming

OptionNbboQuote

V8 Message Definiton

This table contains live option quote records from OPRA (equities) or the listing exchange (futures). Each record contains up to two price levels and represents a live snapshot of the book for a specific option series. There are typically 1mm+ records in this table if all ticker sources are enabled.

METADATA

AttributeValue
Topic2750-market-data-options
MLink TokenOptMktData
ProductSRLive
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
okey_atenum - AssetTypePRI'None'
okey_tsenum - TickerSrcPRI'None'
okey_tkVARCHAR(12)PRI''
okey_yrSMALLINT UNSIGNEDPRI, SEC0
okey_mnTINYINT UNSIGNEDPRI, SEC0
okey_dyTINYINT UNSIGNEDPRI, SEC0
okey_xxDOUBLEPRI0
okey_cpenum - CallPutPRI'Call'
updateTypeenum - UpdateType'None'
bidPriceFLOAT0bid price
askPriceFLOAT0ask price
bidSizeINT0bid size in contracts largest exch quote
askSizeINT0ask size in contracts largest exch quote
cumBidSizeINT0bid size in contracts total nbbo size
cumAskSizeINT0ask size in contracts total nbbo size
bidExchenum - OptExch'None'first or largest remaining exchange at bid price
askExchenum - OptExch'None'first or largest remaining exchange at ask price
bidMaskINT UNSIGNED0exchange bid bit mask
askMaskINT UNSIGNED0exchange ask bit mask
bidMktTypeVARCHAR(255)'None'bid side quote flags if any
askMktTypeVARCHAR(255)'None'ask side quote flags if any
bidPrice2FLOAT02nd best bid price
askPrice2FLOAT02nd best ask price
cumBidSize2INT0cumulative size at 2nd price
cumAskSize2INT0cumulative size at 2nd price
bidTimeINT0last bid price change milliseconds since midnight calculated from the srcTimestamp
askTimeINT0last ask price change milliseconds since midnight calculated from the srcTimestamp
srcTimestampBIGINT0source high precision timestamp if available
netTimestampBIGINT0inbound packet PTP timestamp from SR gateway switchusually syncronized with facility grandfather clock

PRIMARY KEY DEFINITION (Unique)

FieldSequence
okey_tk1
okey_yr2
okey_mn3
okey_dy4
okey_xx5
okey_cp6
okey_at7
okey_ts8

SECONDARY INDEX (ExpirationIndex) (Not Unique)

FieldSequence
okey_yr1
okey_mn2
okey_dy3

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRLive`.`MsgOptionNbboQuote` (
`okey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`okey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`okey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`okey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`okey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_xx` DOUBLE NOT NULL DEFAULT 0,
`okey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call',
`updateType` ENUM('None','PrcChange','SizeOnly','PrevPeriod') NOT NULL DEFAULT 'None',
`bidPrice` FLOAT NOT NULL DEFAULT 0 COMMENT 'bid price',
`askPrice` FLOAT NOT NULL DEFAULT 0 COMMENT 'ask price',
`bidSize` INT NOT NULL DEFAULT 0 COMMENT 'bid size in contracts (largest exch quote)',
`askSize` INT NOT NULL DEFAULT 0 COMMENT 'ask size in contracts (largest exch quote)',
`cumBidSize` INT NOT NULL DEFAULT 0 COMMENT 'bid size in contracts (total nbbo size)',
`cumAskSize` INT NOT NULL DEFAULT 0 COMMENT 'ask size in contracts (total nbbo size)',
`bidExch` ENUM('None','AMEX','BOX','CBOE','ISE','NYSE','PHLX','NSDQ','BATS','C2','NQBX','MIAX','GMNI','CME','CBOT','NYMEX','COMEX','ICE','EDGO','MCRY','MPRL','SDRK','DQTE','EMLD','CFE','MEMX','SPHR','EUREX','CEDX','NXAM','NXBR','NXLS','NXML','NXOS','NXP','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'first (or largest remaining) exchange at bid price',
`askExch` ENUM('None','AMEX','BOX','CBOE','ISE','NYSE','PHLX','NSDQ','BATS','C2','NQBX','MIAX','GMNI','CME','CBOT','NYMEX','COMEX','ICE','EDGO','MCRY','MPRL','SDRK','DQTE','EMLD','CFE','MEMX','SPHR','EUREX','CEDX','NXAM','NXBR','NXLS','NXML','NXOS','NXP','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'first (or largest remaining) exchange at ask price',
`bidMask` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'exchange bid bit mask',
`askMask` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'exchange ask bit mask',
`bidMktType` VARCHAR(255) NOT NULL DEFAULT 'None' COMMENT 'bid side quote flags (if any)',
`askMktType` VARCHAR(255) NOT NULL DEFAULT 'None' COMMENT 'ask side quote flags (if any)',
`bidPrice2` FLOAT NOT NULL DEFAULT 0 COMMENT '2nd best bid price',
`askPrice2` FLOAT NOT NULL DEFAULT 0 COMMENT '2nd best ask price',
`cumBidSize2` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size at 2nd price',
`cumAskSize2` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size at 2nd price',
`bidTime` INT NOT NULL DEFAULT 0 COMMENT 'last bid price change (milliseconds since midnight) calculated from the srcTimestamp',
`askTime` INT NOT NULL DEFAULT 0 COMMENT 'last ask price change (milliseconds since midnight) calculated from the srcTimestamp',
`srcTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'source high precision timestamp (if available)',
`netTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'inbound packet PTP timestamp from SR gateway switch;usually syncronized with facility grandfather clock',
PRIMARY KEY USING HASH (`okey_tk`,`okey_yr`,`okey_mn`,`okey_dy`,`okey_xx`,`okey_cp`,`okey_at`,`okey_ts`),
KEY `ExpirationIndex` (`okey_yr`,`okey_mn`,`okey_dy`) USING HASH
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='This table contains live option quote records from OPRA (equities) or the listing exchange (futures). Each record contains up to two price levels and represents a live snapshot of the book for a specific option series. There are typically 1mm+ records in this table if all ticker sources are enabled.';

SELECT TABLE EXAMPLE QUERY

SELECT
`okey_at`,
`okey_ts`,
`okey_tk`,
`okey_yr`,
`okey_mn`,
`okey_dy`,
`okey_xx`,
`okey_cp`,
`updateType`,
`bidPrice`,
`askPrice`,
`bidSize`,
`askSize`,
`cumBidSize`,
`cumAskSize`,
`bidExch`,
`askExch`,
`bidMask`,
`askMask`,
`bidMktType`,
`askMktType`,
`bidPrice2`,
`askPrice2`,
`cumBidSize2`,
`cumAskSize2`,
`bidTime`,
`askTime`,
`srcTimestamp`,
`netTimestamp`
FROM `SRLive`.`MsgOptionNbboQuote`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`okey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`okey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`okey_tk` = 'Example_okey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`okey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`okey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`okey_dy` = 1
AND
/* Replace with a DOUBLE */
`okey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`okey_cp` = 'Call';

Doc Columns Query

SELECT * FROM SRLive.doccolumns WHERE TABLE_NAME='OptionNbboQuote' ORDER BY ordinal_position ASC;